package com.example.md.dto.file;

import java.util.List;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class FileTreeResDTO {

    public static class TreeNode {
        private String name;
        private String path;
        private Boolean isDirectory;
        private List<TreeNode> children;

        // 构造函数、getters 和 setters
        public TreeNode(String name, String path, Boolean isDirectory, List<TreeNode> children) {
            this.name = name;
            this.path = path;
            this.isDirectory = isDirectory;
            this.children = children;
        }

        // Getters and Setters
        public String getName() {
            return name;
        }

        public String getPath() {
            return path;
        }

        public Boolean getIsDirectory() {
            return isDirectory;
        }

        public List<TreeNode> getChildren() {
            return children;
        }

    }

    private TreeNode tree;
}
